<?php

class RegisterView extends View {

	protected $errorMessage;
	
	function getErrorMessage() {
		return $this->errorMessage;
	}
	
	function setErrorMessage($e) {
		$this->errorMessage = $e;
	}

	function __construct() {
	
	}
	
	function display()  {
	
		if ($_POST['action'] == 'save') {
			echo $this->errorMessage;
		}
		echo '<form method="post" action="index.php?page=member&view=register">';
		echo '<table border="0">';
		echo '<tr><td>First name:</td><td> <input type="text" name="fname"></td></tr>';
		echo '<tr><td>Last name:</td><td> <input type="text" name="lname"></td></tr>';
		echo '<tr><td>Username:</td><td> <input type="text" name="uname"></td></tr>';
		echo '<tr><td>Password:</td><td> <input type="password" name="pass"></td></tr>';
		echo '<tr><td>Repeat Password:</td><td> <input type="password" name="repeatpass"></td></tr>';
		echo '<tr><td colspan = "2">Creditcard type:</td></tr>';
		echo '<tr><td><input type="radio" name="ctype" value="visa">VISA</td>';
		echo '<td><input type="radio" name="ctype" value="master">Mastercard</td></tr>';
		echo '<tr><td>Creditcard number:</td><td> <input type="text" name="cnumber"></td></tr>';
		echo '<tr><td>Address:</td><td> <input type="text" name="address"></td></tr>';
		echo '<tr><td>Phone number:</td><td> <input type="text" name="phone"></td></tr>';
		echo '<input type="hidden" name="action" value="save" />';
		echo '<tr><td></td><td colspan = "2"><input type="submit" name="submit" value="Register" class="btn btn-default"></td></tr> ';
		
		echo '</table>';
		echo '</form>';

	}
}




?>